---
layout: default
class: home
css: ['pages/index.css']
comments: false
repo: false
menu: 首页
---

{% assign assets_base_url = site.url %}
{% if site.cdn.jsdelivr.enabled %}
{% assign assets_base_url = "https://cdn.jsdelivr.net/gh/" | append: site.repository | append: '@master' %}
{% endif %}
<section class="banner mobile-hidden">
  <div class="collection-head small">
    <div class="container">
      <div class="columns">
        <div class="column two-thirds">
          <div class="collection-title">
            <h1 class="collection-header" id="sub-title"><span>{{ site.subtitle }}</span></h1>
            <div class="collection-info">
              {% if site.location %}
                <span class="meta-info mobile-hidden">
                  <span class="octicon octicon-location"></span>
                  {{ site.location }}
                </span>
              {% endif %}
              {% if site.organization %}
                <span class="meta-info">
                  <span class="octicon octicon-organization"></span>
                  <a href="{{ site.organization_url }}" target="_blank">{{ site.organization }}</a>
                </span>
              {% endif %}
              <span class="meta-info">
                <span class="octicon octicon-mark-github"></span>
                <a href="https://github.com/{{ site.github_username }}" target="_blank">{{ site.github_username }}</a>
              </span>
            </div>
          </div>
        </div>
        <div class="column one-third mobile-hidden">
          <div class="collection-title">
            {% include sidebar-qrcode.html %}
          </div>
        </div>
      </div>
    </div>
  </div>
</section>
<!-- /.banner -->
<section class="container content">
  <div class="columns">
    {% if page.repo %}
    <div class="column two-thirds">
    {% else %}
    <div class="column">
    {% endif %}
      <ol class="repo-list">
        {% for post in site.posts %}
          {% if paginator.page == 1 %}
            {% if post.pinned == true %}
              <li class="repo-list-item">
                <h3 class="repo-list-name"><a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a></h3>
                <div class="repo-list-description">
                  <p>
                    {% include no-linenos.html content=post.content %}
                    {{ content | markdownify | strip_html | truncate: 200 | escape }}
                  </p>
                </div>
                <div class="repo-list-meta flex align-items-center">
                  <div class="mr-auto">
                    <span class="meta-info">
                      <span class="octicon octicon-calendar"></span> {{ post.date | date: "%Y/%m/%d" }}
                    </span>
                    {% for cat in post.categories %}
                      <span class="meta-info">
                        <span class="octicon octicon-file-directory"></span>
                        <a href="{{ site.url }}/categories/#{{ cat }}" title="{{ cat }}">{{ cat }}</a>
                      </span>
                    {% endfor %}
                  </div>
                  <div class="pin">
                    <i class="octicon octicon-pin"></i>
                    <span>Pinned</span>
                  </div>
                </div>
              </li>
            {% endif %}
          {% endif %}
        {% endfor %}

        {% for post in paginator.posts %}
          {% if post.pinned != true %}
            <li class="repo-list-item">
              <h3 class="repo-list-name"><a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a></h3>
              <div class="repo-list-description">
                <p>
                  {% include no-linenos.html content=post.content %}
                  {{ content | markdownify | strip_html | truncate: 200 | escape }}
                </p>
              </div>
              <p class="repo-list-meta">
                <span class="meta-info">
                  <span class="octicon octicon-calendar"></span> {{ post.date | date: "%Y/%m/%d" }}
                </span>
                {% for cat in post.categories %}
                  <span class="meta-info">
                    <span class="octicon octicon-file-directory"></span>
                    <a href="{{ site.url }}/categories/#{{ cat }}" title="{{ cat }}">{{ cat }}</a>
                  </span>
                {% endfor %}
              </p>
            </li>
          {% endif %}
        {% endfor %}
      </ol>
    </div>
    {% if page.repo %}
      <div class="column one-third">
        {% include sidebar-categories-cloud.html %}
        {% include sidebar-ad.html %}
        {% include popular-repo.html %}
      </div>
    {% endif %}
  </div>
  <div class="pagination text-align-right">
    <div class="btn-group">
      {% if paginator.previous_page %}
        {% if paginator.previous_page == 1 %}
          <a href="{{ site.url }}/" class="octicon octicon-arrow-left btn btn-outline"></a>
        {% else %}
          <a href="{{ site.url }}/page{{paginator.previous_page}}"  class="octicon octicon-arrow-left btn btn-outline"></a>
        {% endif %}
      {% else %}
        <a disabled href="javascript:;" class="octicon octicon-arrow-left btn btn-outline"></a>
      {% endif %}
      {% if paginator.page == 1 %}
        <a href="javascript:;" class="active btn btn-outline">1</a>
      {% else %}
        <a href="{{ site.url }}/"  class="btn btn-outline">1</a>
      {% endif %}
      {% for count in (2..paginator.total_pages) %}
        {% if count == paginator.page %}
          <a href="javascript:;"  class="active btn btn-outline">{{count}}</a>
        {% else %}
          <a href="{{ site.url }}/page{{count}}"  class="btn btn-outline">{{count}}</a>
        {% endif %}
      {% endfor %}
      {% if paginator.next_page %}
        <a href="{{ site.url }}/page{{paginator.next_page}}"  class="octicon octicon-arrow-right btn btn-outline"></a>
      {% else %}
        <button disabled="disabled" href="javascript:;" class="octicon octicon-arrow-right btn btn-outline"></button>
      {% endif %}
    </div>
  </div>
  <!-- /pagination -->
</section>
<!-- /section.content -->
